package com.tron.sync.entities;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * synda机构全文检索实体类
 */
@Data
@Document(indexName = "xrhd_syndaorgdoc")
public class SyndaOrgDoc {

    /**
     * "pathName":null,
     * 			"partyType":null,
     * 			"extValue":"3",
     * 			"subCount":0,
     * 			"orgType":"3",
     * 			"roleIDs":null,
     * 			"orgCode":"",
     * 			"id":"786884076920373248",
     * 			"sn":0,
     * 			"attribute":"2",
     * 			"level":null,
     * 			"org":false,
     * 			"ip":null,
     * 			"orgPid":"785916005351161856",
     * 			"dataStatus":null,
     * 			"active":true,
     * 			"sort":0,
     * 			"dept":true,
     * 			"roleList":null,
     * 			"parentId":"785916390342131712",
     * 			"createBy":null,
     * 			"depth":6,
     * 			"pinyin":null,
     * 			"levelID":"466946461976756224",
     * 			"inherit":"0",
     * 			"hasChild":false,
     * 			"name":"云南省公安厅警令部办公室督办科督办科督办科督办",
     * 			"tenantId":null,
     * 			"dbtype":null,
     * 			"pk":"",
     * 			"region":"",
     * 			"brevity":"督办科督办",
     * 			"topDept":false,
     * 			"orgAlias":"ynsgatjlbbgsdbkdbkdbkdb",
     * 			"status":"actived"
     */

    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String name;

    /**
     * 机构别名
     */
    @Field(type = FieldType.Text)
    private String orgAlias;

    @Field(type = FieldType.Keyword)
    private String status;

    @Field(type = FieldType.Text)
    private String levelId;

    @Field(type = FieldType.Text)
    private String roleIds;

    @Field(type = FieldType.Text)
    private String orgType;

    /**
     * 机构属性
     */
    @Field(type = FieldType.Keyword)
    private String  attribute;

    @Field(type = FieldType.Keyword)
    private String orgPid;

    @Field(type = FieldType.Text)
    private String orgCode;

    /**
     * 行政区划
     */
    @Field(type = FieldType.Text)
    private String region;

    /**
     * 机构简称
     */
    @Field(type = FieldType.Text)
    private String brevity;

    /**
     * 是否继承管理权
     */
    @Field(type = FieldType.Text)
    private String inherit;

    @Field(type = FieldType.Text)
    private String sort;

    /**
     * 所属警种
     */
    @Field(type = FieldType.Text)
    private String classIfy;

    @Field(type = FieldType.Keyword)
    private String path;
}
